import request from '@/utils/request'
// 升级赚钱接口
export async function getEarning(params) {
  const res = await request({
    url: '/earning',
    method: 'post',
    data: params || {}
  })
  return res
}

// 升级赚钱接口 [2.0]
export async function getEarningV2New(params) {
  const res = await request({
    url: '/upgrade-benefit/v2-load',
    method: 'get',
    params: params || {}
  })
  return res
}

// 箱起banner
export async function getBoxBanner(params) {
  const res = await request({
    url: '/earning/box/banner',
    method: 'get',
    params: params || {}
  })
  return res
}

// 城市合伙人接口
export async function earningPartner(params) {
  const res = await request({
    url: '/earning/partner',
    method: 'post',
    data: params || {}
  })
  return res
}
// 城市合伙人区域接口
export async function earningPartnerArea(params) {
  const res = await request({
    url: '/earning/partner/area',
    method: 'post',
    data: params || {}
  })
  return res
}
// 城市合伙人免任务期列表接口
export async function earningPartnerAvoidTask(params) {
  const res = await request({
    url: '/earning/partner/avoid-task',
    method: 'post',
    data: params || {}
  })
  return res
}
// 城市合伙人免任务期申请接口
export async function earningPartnerAvoidApply(params) {
  const res = await request({
    url: '/earning/partner/avoid-task/apply',
    method: 'post',
    data: params || {}
  })
  return res
}
// 城市合伙人规则接口
export async function earningPartnerRule(params) {
  const res = await request({
    url: '/earning/partner/rule',
    method: 'post',
    data: params || {}
  })
  return res
}
// 会员礼包接口
export async function earningGoods(params) {
  const res = await request({
    url: '/earning/member/goods',
    method: 'post',
    data: params || {}
  })
  return res
}
// 上级二维码获取
export async function earningCode(params) {
  const res = await request({
    url: '/earning/member/code',
    method: 'post',
    data: params || {}
  })
  return res
}
// 箱起接口
export async function earningBox(params) {
  const res = await request({
    url: '/earning/box',
    method: 'post',
    data: params || {}
  })
  return res
}
// 箱起接口
export async function earningBoxDetail(params) {
  const res = await request({
    url: '/earning/box/detail',
    method: 'post',
    data: params || {}
  })
  return res
}

// 箱起接口
export async function earningPermission(params) {
  const res = await request({
    url: '/earning/role-permission',
    method: 'post',
    data: params || {}
  })
  return res
}

// 获取用户权限
export async function getPermission(params) {
  const res = await request({
    url: '/stock/user/permission',
    method: 'post',
    data: params || {}
  })
  return res
}
